package com.chenfan.mcn.model.vo;

import com.chenfan.mcn.enums.BusinessCommissionEnum;
import com.chenfan.mcn.model.BusinessCommission;
import com.chenfan.mcn.model.common.PageInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Objects;

/**
 * @Author liuyang
 * @Date 2021/6/8
 * @Time 10:22
 * @Version V1.0
 **/
@EqualsAndHashCode(callSuper = true)
@Data
public class BusinessCommissionInfo extends BusinessCommission {

    /**
     * 收入合同
     */
    private PageInfo<BusinessCommissionDetailVO> businessCommissionDetailList;

    /**
     * 执行单列表
     */
    private PageInfo<BusinessCommissionDetailVoV2> businessCommissionDetailV2List;

    /**
     * 提成单状态名称(1-新建，2-已发送，3-已确认，4-已发放, 9-已作废)
     */
    private String businessStatusName;


    public String getBusinessStatusName() {
        if (Objects.nonNull(getBusinessStatus())) {
            return BusinessCommissionEnum.getStatusName(getBusinessStatus());
        }
        return null;
    }

}
